/**
 * @author truexin
 * @date   16/05/12    
 */
(function(lf, r){    
    var RC = r.createClass,
        imgUrl = lf.imgUrl.yue,
        doAction = lf.bridgeJs.doAction;
  
    var Body = RC ({ 
        getInitialState: function () {
            // return null;这里需要返回null or object
            return {};
        },
        componentDidMount:function(){
            var $pay = $(r.findDOMNode(this.refs.pay));
            var $payPage = $(r.findDOMNode(this.refs.payPage));
            $pay.on('tap', function (e) {
                $payPage.css({display:"block"});
            });
            $payPage.on('tap', function (e) {
                $payPage.css({display:"none"});
            });
        },
        clickFn: function () {					
            doAction("yue-main-detail.html","约主题内容详情");		
        },
        tagFn: function () {
            doAction("yue-index.html","约");
        },
        render: function () {
            return (
                <div className="yue-kitchen-confirm">
                    <div className="page-success" ref="payPage">
                        <div className="center-box">
                            <h3>预定成功</h3>
                            <ul className="kitchen-num">
                                <li>厨房2</li>
                                <li>2015/04/20  18:00-21:00</li>
                                <li>请提前半个小时到达</li>
                            </ul>
                            <ul className="check-btn">
                                <li><a href="#">查看订单</a></li>
                                <li onTouchEnd={this.tagFn}><a href="#">前去邀约</a></li>
                            </ul>
                        </div>
                    </div>
                    <div className="title-msg">
                        <i className="yes"></i>
                        <h3>您的订单已提交</h3>
                        <p>30分钟内未处理，订单自动取消</p>
                    </div>
                    <div className="main-msg">
                        <table>
                            <tr>
                                <td>订单号</td>
                                <td>5196003</td>
                            </tr>
                            <tr>
                                <td>订单时间</td>
                                <td>2015-11-27 14:00</td>
                            </tr>
                            <tr>
                                <td>订单总价</td>
                                <td>¥50</td>
                            </tr>
                        </table>
                    </div>
                    <ul className="charge-way">
                        <li className="alipay">支付宝支付<i className="iconfont active"></i></li>
                        <li className="wechat">微信支付<i className="iconfont"></i></li>
                    </ul>
                    <a className="confirm-btn" ref="pay">支付</a>
                </div>  
            )
        }
      });
  
    r.render(
        <Body />,
        document.getElementById('root'),function(){
        }
    )
})( liefeng, React)